package com.example.function.integration.mapper;

import com.example.function.integration.annotation.DataSource;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description：测试Mapper接口，配置多数据源
 * @Author： fengcheng
 * @Date： 2024/11/8 15:10
 */
@Repository
public interface AmanSysConfigMapper {

    @Select("select config_id from sys_config")
    List<String> getAmanSysConfig();

    @DataSource("aDataSource")
    @Select("select config_key from sys_config")
    List<String> getAmanSysConfigByOprDataSource();

    @DataSource("bDataSource")
    @Select("select config_name from sys_config")
    List<String> getAmanSysConfigBySecDataSource();

    @DataSource("cDataSource")
    @Select("select config_value from sys_config")
    List<String> getAmanSysConfigBySysDataSource();

}
